package com.samskievert.cactusboom;

import com.threerings.media.sprite.ImageSprite;
import java.awt.Graphics2D;

import java.awt.Color;
import java.awt.geom.AffineTransform;
import java.awt.Dimension;
import java.awt.Point;
import java.awt.Font;
import java.awt.Polygon;
import java.awt.Rectangle;
import com.threerings.media.util.LinePath;
import java.util.Iterator;
import com.threerings.util.Name;

import com.threerings.media.image.BufferedMirage;
import com.threerings.media.image.Mirage;


public class GameOverSprite extends ImageSprite
{
    public static final int SIZE = 48; 
    public double scale = 1.0;
    private CBObject.Cowboy _cowboy;
    private Dimension _boardsize;
    private BufferedMirage _image;
    private String _whichPlayer;
    private CBLogic.movePath _movepath;
    
    public GameOverSprite(String whichPlayer, BufferedMirage image)
    {
        super(image);
        setLocation(100,100);
        _whichPlayer = whichPlayer;
        _image = image;
        setRenderOrder(100);
    }
    
    @Override // from Sprite
    public void paint (Graphics2D gfx)
    {
        AffineTransform currentRot = gfx.getTransform();
        gfx.setColor(Color.black);
        gfx.translate(50,100);
        gfx.scale(3,3);
        _image.paint(gfx,0,0);
        gfx.scale(0.2,0.2);
        Font font =  new Font("arial",0,32);
       gfx.setFont(font);
       gfx.drawString(_whichPlayer + " WINS!",200,175);
        gfx.setTransform(currentRot);
    }
}


